package hafnium.bukkit.util.sign;

import org.bukkit.ChatColor;

public abstract class SignText {
	public abstract String getLine(int lineIndex);
	public abstract void setLine(int lineIndex, String text);
	
	public void paintLine(int lineIndex, ChatColor c) {
		this.setLine(lineIndex, c + ChatColor.stripColor(this.getLine(lineIndex)));
	}
	
	public void paintLines(ChatColor c) {
		for (int i = 0; i < 4; i++) {
			this.paintLine(i, c);
		}
	}
	
	public void capitalizeLine(int lineIndex) {
		this.setLine(lineIndex, this.getLine(lineIndex).toUpperCase());
	}
	
	public void decapitalizeLine(int lineIndex) {
		this.setLine(lineIndex, this.getLine(lineIndex).toLowerCase());
	}
}
